// $ANTLR : "Anasint2.g" -> "Anasint2.java"$

	package procesador.consultas;

import antlr.TokenBuffer;
import antlr.TokenStreamException;
import antlr.TokenStreamIOException;
import antlr.ANTLRException;
import antlr.LLkParser;
import antlr.Token;
import antlr.TokenStream;
import antlr.RecognitionException;
import antlr.NoViableAltException;
import antlr.MismatchedTokenException;
import antlr.SemanticException;
import antlr.ParserSharedInputState;
import antlr.collections.impl.BitSet;
import antlr.collections.AST;
import java.util.Hashtable;
import antlr.ASTFactory;
import antlr.ASTPair;
import antlr.collections.impl.ASTArray;

public class Anasint2 extends antlr.LLkParser       implements Anasint2TokenTypes
 {

protected Anasint2(TokenBuffer tokenBuf, int k) {
  super(tokenBuf,k);
  tokenNames = _tokenNames;
  buildTokenTypeASTClassMap();
  astFactory = new ASTFactory(getTokenTypeToASTClassMap());
}

public Anasint2(TokenBuffer tokenBuf) {
  this(tokenBuf,1);
}

protected Anasint2(TokenStream lexer, int k) {
  super(lexer,k);
  tokenNames = _tokenNames;
  buildTokenTypeASTClassMap();
  astFactory = new ASTFactory(getTokenTypeToASTClassMap());
}

public Anasint2(TokenStream lexer) {
  this(lexer,1);
}

public Anasint2(ParserSharedInputState state) {
  super(state,1);
  tokenNames = _tokenNames;
  buildTokenTypeASTClassMap();
  astFactory = new ASTFactory(getTokenTypeToASTClassMap());
}

/** Parsea todo el fichero */
	public final void entrada() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		AST entrada_AST = null;
		
		try {      // for error handling
			{
			_loop3:
			do {
				if ((LA(1)==IDENT)) {
					asign_consulta();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else {
					break _loop3;
				}
				
			} while (true);
			}
			match(Token.EOF_TYPE);
			if ( inputState.guessing==0 ) {
				entrada_AST = (AST)currentAST.root;
				entrada_AST=(AST)astFactory.make( (new ASTArray(2)).add(astFactory.create(CONSULTAS,"CONSULTAS")).add(entrada_AST));
				currentAST.root = entrada_AST;
				currentAST.child = entrada_AST!=null &&entrada_AST.getFirstChild()!=null ?
					entrada_AST.getFirstChild() : entrada_AST;
				currentAST.advanceChildToEnd();
			}
			entrada_AST = (AST)currentAST.root;
		}
		catch (RecognitionException ex) {
			if (inputState.guessing==0) {
				reportError(ex);
				recover(ex,_tokenSet_0);
			} else {
			  throw ex;
			}
		}
		returnAST = entrada_AST;
	}
	
	public final void asign_consulta() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		AST asign_consulta_AST = null;
		
		try {      // for error handling
			AST tmp2_AST = null;
			tmp2_AST = astFactory.create(LT(1));
			astFactory.addASTChild(currentAST, tmp2_AST);
			match(IDENT);
			AST tmp3_AST = null;
			tmp3_AST = astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp3_AST);
			match(ASIGN);
			consulta();
			astFactory.addASTChild(currentAST, returnAST);
			match(8);
			asign_consulta_AST = (AST)currentAST.root;
		}
		catch (RecognitionException ex) {
			if (inputState.guessing==0) {
				reportError(ex);
				recover(ex,_tokenSet_1);
			} else {
			  throw ex;
			}
		}
		returnAST = asign_consulta_AST;
	}
	
	public final void consulta() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		AST consulta_AST = null;
		
		try {      // for error handling
			switch ( LA(1)) {
			case SELECT:
			{
				restriccion();
				astFactory.addASTChild(currentAST, returnAST);
				consulta_AST = (AST)currentAST.root;
				break;
			}
			case PROJECT:
			{
				proyeccion();
				astFactory.addASTChild(currentAST, returnAST);
				consulta_AST = (AST)currentAST.root;
				break;
			}
			default:
				boolean synPredMatched7 = false;
				if (((LA(1)==IDENT||LA(1)==14))) {
					int _m7 = mark();
					synPredMatched7 = true;
					inputState.guessing++;
					try {
						{
						consulta_i();
						match(UNION);
						}
					}
					catch (RecognitionException pe) {
						synPredMatched7 = false;
					}
					rewind(_m7);
inputState.guessing--;
				}
				if ( synPredMatched7 ) {
					union();
					astFactory.addASTChild(currentAST, returnAST);
					consulta_AST = (AST)currentAST.root;
				}
				else {
					boolean synPredMatched9 = false;
					if (((LA(1)==IDENT||LA(1)==14))) {
						int _m9 = mark();
						synPredMatched9 = true;
						inputState.guessing++;
						try {
							{
							consulta_i();
							match(DIFFERENCE);
							}
						}
						catch (RecognitionException pe) {
							synPredMatched9 = false;
						}
						rewind(_m9);
inputState.guessing--;
					}
					if ( synPredMatched9 ) {
						diferencia();
						astFactory.addASTChild(currentAST, returnAST);
						consulta_AST = (AST)currentAST.root;
					}
					else {
						boolean synPredMatched11 = false;
						if (((LA(1)==IDENT||LA(1)==14))) {
							int _m11 = mark();
							synPredMatched11 = true;
							inputState.guessing++;
							try {
								{
								consulta_i();
								match(NJOIN);
								}
							}
							catch (RecognitionException pe) {
								synPredMatched11 = false;
							}
							rewind(_m11);
inputState.guessing--;
						}
						if ( synPredMatched11 ) {
							concNat();
							astFactory.addASTChild(currentAST, returnAST);
							consulta_AST = (AST)currentAST.root;
						}
						else {
							boolean synPredMatched13 = false;
							if (((LA(1)==IDENT||LA(1)==14))) {
								int _m13 = mark();
								synPredMatched13 = true;
								inputState.guessing++;
								try {
									{
									consulta_i();
									match(INTERSECT);
									}
								}
								catch (RecognitionException pe) {
									synPredMatched13 = false;
								}
								rewind(_m13);
inputState.guessing--;
							}
							if ( synPredMatched13 ) {
								interseccion();
								astFactory.addASTChild(currentAST, returnAST);
								consulta_AST = (AST)currentAST.root;
							}
							else {
								boolean synPredMatched15 = false;
								if (((LA(1)==IDENT||LA(1)==14))) {
									int _m15 = mark();
									synPredMatched15 = true;
									inputState.guessing++;
									try {
										{
										consulta_i();
										match(PRODUCT);
										}
									}
									catch (RecognitionException pe) {
										synPredMatched15 = false;
									}
									rewind(_m15);
inputState.guessing--;
								}
								if ( synPredMatched15 ) {
									producto();
									astFactory.addASTChild(currentAST, returnAST);
									consulta_AST = (AST)currentAST.root;
								}
								else if ((LA(1)==IDENT)) {
									valor();
									astFactory.addASTChild(currentAST, returnAST);
									consulta_AST = (AST)currentAST.root;
								}
							else {
								throw new NoViableAltException(LT(1), getFilename());
							}
							}}}}}
						}
						catch (RecognitionException ex) {
							if (inputState.guessing==0) {
								reportError(ex);
								recover(ex,_tokenSet_2);
							} else {
							  throw ex;
							}
						}
						returnAST = consulta_AST;
					}
					
	public final void restriccion() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		AST restriccion_AST = null;
		
		try {      // for error handling
			AST tmp5_AST = null;
			tmp5_AST = astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp5_AST);
			match(SELECT);
			expresion();
			astFactory.addASTChild(currentAST, returnAST);
			match(14);
			consulta();
			astFactory.addASTChild(currentAST, returnAST);
			match(15);
			restriccion_AST = (AST)currentAST.root;
		}
		catch (RecognitionException ex) {
			if (inputState.guessing==0) {
				reportError(ex);
				recover(ex,_tokenSet_2);
			} else {
			  throw ex;
			}
		}
		returnAST = restriccion_AST;
	}
	
	public final void proyeccion() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		AST proyeccion_AST = null;
		
		try {      // for error handling
			AST tmp8_AST = null;
			tmp8_AST = astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp8_AST);
			match(PROJECT);
			campos();
			astFactory.addASTChild(currentAST, returnAST);
			match(14);
			consulta();
			astFactory.addASTChild(currentAST, returnAST);
			match(15);
			proyeccion_AST = (AST)currentAST.root;
		}
		catch (RecognitionException ex) {
			if (inputState.guessing==0) {
				reportError(ex);
				recover(ex,_tokenSet_2);
			} else {
			  throw ex;
			}
		}
		returnAST = proyeccion_AST;
	}
	
	public final void consulta_i() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		AST consulta_i_AST = null;
		
		try {      // for error handling
			switch ( LA(1)) {
			case 14:
			{
				match(14);
				consulta();
				astFactory.addASTChild(currentAST, returnAST);
				match(15);
				consulta_i_AST = (AST)currentAST.root;
				break;
			}
			case IDENT:
			{
				valor();
				astFactory.addASTChild(currentAST, returnAST);
				consulta_i_AST = (AST)currentAST.root;
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
		}
		catch (RecognitionException ex) {
			if (inputState.guessing==0) {
				reportError(ex);
				recover(ex,_tokenSet_3);
			} else {
			  throw ex;
			}
		}
		returnAST = consulta_i_AST;
	}
	
	public final void union() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		AST union_AST = null;
		
		try {      // for error handling
			consulta_i();
			astFactory.addASTChild(currentAST, returnAST);
			AST tmp13_AST = null;
			tmp13_AST = astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp13_AST);
			match(UNION);
			consulta_i();
			astFactory.addASTChild(currentAST, returnAST);
			union_AST = (AST)currentAST.root;
		}
		catch (RecognitionException ex) {
			if (inputState.guessing==0) {
				reportError(ex);
				recover(ex,_tokenSet_2);
			} else {
			  throw ex;
			}
		}
		returnAST = union_AST;
	}
	
	public final void diferencia() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		AST diferencia_AST = null;
		
		try {      // for error handling
			consulta_i();
			astFactory.addASTChild(currentAST, returnAST);
			AST tmp14_AST = null;
			tmp14_AST = astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp14_AST);
			match(DIFFERENCE);
			consulta_i();
			astFactory.addASTChild(currentAST, returnAST);
			diferencia_AST = (AST)currentAST.root;
		}
		catch (RecognitionException ex) {
			if (inputState.guessing==0) {
				reportError(ex);
				recover(ex,_tokenSet_2);
			} else {
			  throw ex;
			}
		}
		returnAST = diferencia_AST;
	}
	
	public final void concNat() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		AST concNat_AST = null;
		
		try {      // for error handling
			consulta_i();
			astFactory.addASTChild(currentAST, returnAST);
			AST tmp15_AST = null;
			tmp15_AST = astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp15_AST);
			match(NJOIN);
			consulta_i();
			astFactory.addASTChild(currentAST, returnAST);
			concNat_AST = (AST)currentAST.root;
		}
		catch (RecognitionException ex) {
			if (inputState.guessing==0) {
				reportError(ex);
				recover(ex,_tokenSet_2);
			} else {
			  throw ex;
			}
		}
		returnAST = concNat_AST;
	}
	
	public final void interseccion() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		AST interseccion_AST = null;
		
		try {      // for error handling
			consulta_i();
			astFactory.addASTChild(currentAST, returnAST);
			AST tmp16_AST = null;
			tmp16_AST = astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp16_AST);
			match(INTERSECT);
			consulta_i();
			astFactory.addASTChild(currentAST, returnAST);
			interseccion_AST = (AST)currentAST.root;
		}
		catch (RecognitionException ex) {
			if (inputState.guessing==0) {
				reportError(ex);
				recover(ex,_tokenSet_2);
			} else {
			  throw ex;
			}
		}
		returnAST = interseccion_AST;
	}
	
	public final void producto() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		AST producto_AST = null;
		
		try {      // for error handling
			consulta_i();
			astFactory.addASTChild(currentAST, returnAST);
			AST tmp17_AST = null;
			tmp17_AST = astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp17_AST);
			match(PRODUCT);
			consulta_i();
			astFactory.addASTChild(currentAST, returnAST);
			producto_AST = (AST)currentAST.root;
		}
		catch (RecognitionException ex) {
			if (inputState.guessing==0) {
				reportError(ex);
				recover(ex,_tokenSet_2);
			} else {
			  throw ex;
			}
		}
		returnAST = producto_AST;
	}
	
	public final void valor() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		AST valor_AST = null;
		
		try {      // for error handling
			AST tmp18_AST = null;
			tmp18_AST = astFactory.create(LT(1));
			astFactory.addASTChild(currentAST, tmp18_AST);
			match(IDENT);
			valor_AST = (AST)currentAST.root;
		}
		catch (RecognitionException ex) {
			if (inputState.guessing==0) {
				reportError(ex);
				recover(ex,_tokenSet_3);
			} else {
			  throw ex;
			}
		}
		returnAST = valor_AST;
	}
	
	public final void expresion() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		AST expresion_AST = null;
		
		try {      // for error handling
			expr_and();
			astFactory.addASTChild(currentAST, returnAST);
			{
			switch ( LA(1)) {
			case OR:
			{
				AST tmp19_AST = null;
				tmp19_AST = astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp19_AST);
				match(OR);
				expresion();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case 14:
			case 15:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			expresion_AST = (AST)currentAST.root;
		}
		catch (RecognitionException ex) {
			if (inputState.guessing==0) {
				reportError(ex);
				recover(ex,_tokenSet_4);
			} else {
			  throw ex;
			}
		}
		returnAST = expresion_AST;
	}
	
	public final void campos() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		AST campos_AST = null;
		
		try {      // for error handling
			campo();
			astFactory.addASTChild(currentAST, returnAST);
			{
			_loop27:
			do {
				if ((LA(1)==18)) {
					match(18);
					campo();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else {
					break _loop27;
				}
				
			} while (true);
			}
			if ( inputState.guessing==0 ) {
				campos_AST = (AST)currentAST.root;
				campos_AST=(AST)astFactory.make( (new ASTArray(2)).add(astFactory.create(CAMPOS,"CAMPOS")).add(campos_AST));
				currentAST.root = campos_AST;
				currentAST.child = campos_AST!=null &&campos_AST.getFirstChild()!=null ?
					campos_AST.getFirstChild() : campos_AST;
				currentAST.advanceChildToEnd();
			}
			campos_AST = (AST)currentAST.root;
		}
		catch (RecognitionException ex) {
			if (inputState.guessing==0) {
				reportError(ex);
				recover(ex,_tokenSet_5);
			} else {
			  throw ex;
			}
		}
		returnAST = campos_AST;
	}
	
	public final void campo() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		AST campo_AST = null;
		
		try {      // for error handling
			AST tmp21_AST = null;
			tmp21_AST = astFactory.create(LT(1));
			astFactory.addASTChild(currentAST, tmp21_AST);
			match(IDENT);
			campo_AST = (AST)currentAST.root;
		}
		catch (RecognitionException ex) {
			if (inputState.guessing==0) {
				reportError(ex);
				recover(ex,_tokenSet_6);
			} else {
			  throw ex;
			}
		}
		returnAST = campo_AST;
	}
	
	public final void expr_and() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		AST expr_and_AST = null;
		
		try {      // for error handling
			expr_not();
			astFactory.addASTChild(currentAST, returnAST);
			{
			switch ( LA(1)) {
			case AND:
			{
				AST tmp22_AST = null;
				tmp22_AST = astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp22_AST);
				match(AND);
				expr_and();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case 14:
			case 15:
			case OR:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			expr_and_AST = (AST)currentAST.root;
		}
		catch (RecognitionException ex) {
			if (inputState.guessing==0) {
				reportError(ex);
				recover(ex,_tokenSet_7);
			} else {
			  throw ex;
			}
		}
		returnAST = expr_and_AST;
	}
	
	public final void expr_not() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		AST expr_not_AST = null;
		
		try {      // for error handling
			switch ( LA(1)) {
			case NOT:
			{
				AST tmp23_AST = null;
				tmp23_AST = astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp23_AST);
				match(NOT);
				expr_rel();
				astFactory.addASTChild(currentAST, returnAST);
				expr_not_AST = (AST)currentAST.root;
				break;
			}
			case IDENT:
			case 14:
			case 29:
			case NUMERO:
			case CADENA:
			{
				expr_rel();
				astFactory.addASTChild(currentAST, returnAST);
				expr_not_AST = (AST)currentAST.root;
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
		}
		catch (RecognitionException ex) {
			if (inputState.guessing==0) {
				reportError(ex);
				recover(ex,_tokenSet_8);
			} else {
			  throw ex;
			}
		}
		returnAST = expr_not_AST;
	}
	
	public final void expr_rel() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		AST expr_rel_AST = null;
		
		try {      // for error handling
			expr_sum();
			astFactory.addASTChild(currentAST, returnAST);
			{
			switch ( LA(1)) {
			case 22:
			case 23:
			case 24:
			case 25:
			case 26:
			case 27:
			{
				{
				switch ( LA(1)) {
				case 22:
				{
					AST tmp24_AST = null;
					tmp24_AST = astFactory.create(LT(1));
					astFactory.makeASTRoot(currentAST, tmp24_AST);
					match(22);
					break;
				}
				case 23:
				{
					AST tmp25_AST = null;
					tmp25_AST = astFactory.create(LT(1));
					astFactory.makeASTRoot(currentAST, tmp25_AST);
					match(23);
					break;
				}
				case 24:
				{
					AST tmp26_AST = null;
					tmp26_AST = astFactory.create(LT(1));
					astFactory.makeASTRoot(currentAST, tmp26_AST);
					match(24);
					break;
				}
				case 25:
				{
					AST tmp27_AST = null;
					tmp27_AST = astFactory.create(LT(1));
					astFactory.makeASTRoot(currentAST, tmp27_AST);
					match(25);
					break;
				}
				case 26:
				{
					AST tmp28_AST = null;
					tmp28_AST = astFactory.create(LT(1));
					astFactory.makeASTRoot(currentAST, tmp28_AST);
					match(26);
					break;
				}
				case 27:
				{
					AST tmp29_AST = null;
					tmp29_AST = astFactory.create(LT(1));
					astFactory.makeASTRoot(currentAST, tmp29_AST);
					match(27);
					break;
				}
				default:
				{
					throw new NoViableAltException(LT(1), getFilename());
				}
				}
				}
				expr_sum();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case 14:
			case 15:
			case OR:
			case AND:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			expr_rel_AST = (AST)currentAST.root;
		}
		catch (RecognitionException ex) {
			if (inputState.guessing==0) {
				reportError(ex);
				recover(ex,_tokenSet_8);
			} else {
			  throw ex;
			}
		}
		returnAST = expr_rel_AST;
	}
	
	public final void expr_sum() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		AST expr_sum_AST = null;
		
		try {      // for error handling
			expr_mul();
			astFactory.addASTChild(currentAST, returnAST);
			{
			switch ( LA(1)) {
			case 28:
			case 29:
			{
				{
				switch ( LA(1)) {
				case 28:
				{
					AST tmp30_AST = null;
					tmp30_AST = astFactory.create(LT(1));
					astFactory.makeASTRoot(currentAST, tmp30_AST);
					match(28);
					break;
				}
				case 29:
				{
					AST tmp31_AST = null;
					tmp31_AST = astFactory.create(LT(1));
					astFactory.makeASTRoot(currentAST, tmp31_AST);
					match(29);
					break;
				}
				default:
				{
					throw new NoViableAltException(LT(1), getFilename());
				}
				}
				}
				expr_sum();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case 14:
			case 15:
			case OR:
			case AND:
			case 22:
			case 23:
			case 24:
			case 25:
			case 26:
			case 27:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			expr_sum_AST = (AST)currentAST.root;
		}
		catch (RecognitionException ex) {
			if (inputState.guessing==0) {
				reportError(ex);
				recover(ex,_tokenSet_9);
			} else {
			  throw ex;
			}
		}
		returnAST = expr_sum_AST;
	}
	
	public final void expr_mul() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		AST expr_mul_AST = null;
		
		try {      // for error handling
			expr_neg();
			astFactory.addASTChild(currentAST, returnAST);
			{
			switch ( LA(1)) {
			case 30:
			case 31:
			{
				{
				switch ( LA(1)) {
				case 30:
				{
					AST tmp32_AST = null;
					tmp32_AST = astFactory.create(LT(1));
					astFactory.makeASTRoot(currentAST, tmp32_AST);
					match(30);
					break;
				}
				case 31:
				{
					AST tmp33_AST = null;
					tmp33_AST = astFactory.create(LT(1));
					astFactory.makeASTRoot(currentAST, tmp33_AST);
					match(31);
					break;
				}
				default:
				{
					throw new NoViableAltException(LT(1), getFilename());
				}
				}
				}
				expr_mul();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case 14:
			case 15:
			case OR:
			case AND:
			case 22:
			case 23:
			case 24:
			case 25:
			case 26:
			case 27:
			case 28:
			case 29:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			expr_mul_AST = (AST)currentAST.root;
		}
		catch (RecognitionException ex) {
			if (inputState.guessing==0) {
				reportError(ex);
				recover(ex,_tokenSet_10);
			} else {
			  throw ex;
			}
		}
		returnAST = expr_mul_AST;
	}
	
	public final void expr_neg() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		AST expr_neg_AST = null;
		
		try {      // for error handling
			switch ( LA(1)) {
			case 29:
			{
				AST tmp34_AST = null;
				tmp34_AST = astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp34_AST);
				match(29);
				expr_base();
				astFactory.addASTChild(currentAST, returnAST);
				expr_neg_AST = (AST)currentAST.root;
				break;
			}
			case IDENT:
			case 14:
			case NUMERO:
			case CADENA:
			{
				expr_base();
				astFactory.addASTChild(currentAST, returnAST);
				expr_neg_AST = (AST)currentAST.root;
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
		}
		catch (RecognitionException ex) {
			if (inputState.guessing==0) {
				reportError(ex);
				recover(ex,_tokenSet_11);
			} else {
			  throw ex;
			}
		}
		returnAST = expr_neg_AST;
	}
	
	public final void expr_base() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		AST expr_base_AST = null;
		
		try {      // for error handling
			switch ( LA(1)) {
			case 14:
			{
				match(14);
				expresion();
				astFactory.addASTChild(currentAST, returnAST);
				match(15);
				expr_base_AST = (AST)currentAST.root;
				break;
			}
			case IDENT:
			{
				AST tmp37_AST = null;
				tmp37_AST = astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp37_AST);
				match(IDENT);
				expr_base_AST = (AST)currentAST.root;
				break;
			}
			case NUMERO:
			{
				AST tmp38_AST = null;
				tmp38_AST = astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp38_AST);
				match(NUMERO);
				expr_base_AST = (AST)currentAST.root;
				break;
			}
			case CADENA:
			{
				AST tmp39_AST = null;
				tmp39_AST = astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp39_AST);
				match(CADENA);
				expr_base_AST = (AST)currentAST.root;
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
		}
		catch (RecognitionException ex) {
			if (inputState.guessing==0) {
				reportError(ex);
				recover(ex,_tokenSet_11);
			} else {
			  throw ex;
			}
		}
		returnAST = expr_base_AST;
	}
	
	
	public static final String[] _tokenNames = {
		"<0>",
		"EOF",
		"<2>",
		"NULL_TREE_LOOKAHEAD",
		"CONSULTAS",
		"CAMPOS",
		"IDENT",
		"ASIGN",
		"\";\"",
		"UNION",
		"DIFFERENCE",
		"NJOIN",
		"INTERSECT",
		"PRODUCT",
		"\"(\"",
		"\")\"",
		"SELECT",
		"PROJECT",
		"\",\"",
		"OR",
		"AND",
		"NOT",
		"\"<\"",
		"\"<=\"",
		"\">\"",
		"\">=\"",
		"\"<>\"",
		"\"=\"",
		"\"+\"",
		"\"-\"",
		"\"*\"",
		"\"/\"",
		"NUMERO",
		"CADENA"
	};
	
	protected void buildTokenTypeASTClassMap() {
		tokenTypeToASTClassMap=null;
	};
	
	private static final long[] mk_tokenSet_0() {
		long[] data = { 2L, 0L};
		return data;
	}
	public static final BitSet _tokenSet_0 = new BitSet(mk_tokenSet_0());
	private static final long[] mk_tokenSet_1() {
		long[] data = { 66L, 0L};
		return data;
	}
	public static final BitSet _tokenSet_1 = new BitSet(mk_tokenSet_1());
	private static final long[] mk_tokenSet_2() {
		long[] data = { 33024L, 0L};
		return data;
	}
	public static final BitSet _tokenSet_2 = new BitSet(mk_tokenSet_2());
	private static final long[] mk_tokenSet_3() {
		long[] data = { 48896L, 0L};
		return data;
	}
	public static final BitSet _tokenSet_3 = new BitSet(mk_tokenSet_3());
	private static final long[] mk_tokenSet_4() {
		long[] data = { 49152L, 0L};
		return data;
	}
	public static final BitSet _tokenSet_4 = new BitSet(mk_tokenSet_4());
	private static final long[] mk_tokenSet_5() {
		long[] data = { 16384L, 0L};
		return data;
	}
	public static final BitSet _tokenSet_5 = new BitSet(mk_tokenSet_5());
	private static final long[] mk_tokenSet_6() {
		long[] data = { 278528L, 0L};
		return data;
	}
	public static final BitSet _tokenSet_6 = new BitSet(mk_tokenSet_6());
	private static final long[] mk_tokenSet_7() {
		long[] data = { 573440L, 0L};
		return data;
	}
	public static final BitSet _tokenSet_7 = new BitSet(mk_tokenSet_7());
	private static final long[] mk_tokenSet_8() {
		long[] data = { 1622016L, 0L};
		return data;
	}
	public static final BitSet _tokenSet_8 = new BitSet(mk_tokenSet_8());
	private static final long[] mk_tokenSet_9() {
		long[] data = { 265863168L, 0L};
		return data;
	}
	public static final BitSet _tokenSet_9 = new BitSet(mk_tokenSet_9());
	private static final long[] mk_tokenSet_10() {
		long[] data = { 1071169536L, 0L};
		return data;
	}
	public static final BitSet _tokenSet_10 = new BitSet(mk_tokenSet_10());
	private static final long[] mk_tokenSet_11() {
		long[] data = { 4292395008L, 0L};
		return data;
	}
	public static final BitSet _tokenSet_11 = new BitSet(mk_tokenSet_11());
	
	}
